package com.ruoyi.tianliangedu.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.tianliangedu.domain.TianliangSubject;
import com.ruoyi.tianliangedu.mapper.TianliangSubjectMapper;
import com.ruoyi.tianliangedu.service.ITianliangSubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 专题增加Service业务层处理
 *
 * @author lsj
 * @date 2021-07-12
 */
@Service
public class TianliangSubjectServiceImpl implements ITianliangSubjectService {
    @Autowired
    private TianliangSubjectMapper tianliangSubjectMapper;

    /**
     * 查询专题增加
     *
     * @param subId 专题增加ID
     * @return 专题增加
     */
    @Override
    public TianliangSubject selectTianliangSubjectById(Integer subId) {
        return tianliangSubjectMapper.selectTianliangSubjectById(subId);
    }

    /**
     * 查询专题增加列表
     *
     * @param tianliangSubject 专题增加
     * @return 专题增加
     */
    @Override
    public List<TianliangSubject> selectTianliangSubjectList(TianliangSubject tianliangSubject) {
        return tianliangSubjectMapper.selectTianliangSubjectList(tianliangSubject);
    }

    /**
     * 新增专题增加
     *
     * @param tianliangSubject 专题增加
     * @return 结果
     */
    @Override
    public int insertTianliangSubject(TianliangSubject tianliangSubject) {
        return tianliangSubjectMapper.insertTianliangSubject(tianliangSubject);
    }

    /**
     * 修改专题增加
     *
     * @param tianliangSubject 专题增加
     * @return 结果
     */
    @Override
    public int updateTianliangSubject(TianliangSubject tianliangSubject) {
        return tianliangSubjectMapper.updateTianliangSubject(tianliangSubject);
    }

    /**
     * 删除专题增加对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTianliangSubjectByIds(String ids) {
        return tianliangSubjectMapper.deleteTianliangSubjectByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除专题增加信息
     *
     * @param subId 专题增加ID
     * @return 结果
     */
    @Override
    public int deleteTianliangSubjectById(Integer subId) {
        return tianliangSubjectMapper.deleteTianliangSubjectById(subId);
    }
}
